/**
 *  ModelFactory
 *
 *  @author : jihuaizhi
 *  @Time   : 2010.03.22 21:08:10 CST
 *  @note   :
 */
package com.basestone.pdlmis.model
{

	public class ModelFactory
	{
		private static var _instance:ModelFactory;

		public static const LOGIN_MODEL:String="LOGIN_MODEL";

		public function ModelFactory()
		{
//			if (_instance != null)
//			{
//				throw new Error("This class is a Singleton!");
//			}
			throw new Error("This class is a Singleton!");
		}

		public static function getModel(modelName:String):ModelBase
		{
			switch (modelName)
			{
				case LOGIN_MODEL:
					return new LoginModel();
				default:
					return null;
			}
		}
	}
}